package com.yulin.security_redis.controller;

import com.yulin.security_redis.bean.Menu;
import com.yulin.security_redis.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 登录之后就可以访问
 * 只要是为了获取一些配置信息
 */
@RestController
@RequestMapping("/config")
public class ConfigController {

    @Autowired
    private MenuService menuService;

   @RequestMapping("sysmenu")
    public List<Menu> sysmenu(){
       return menuService.getMenusByHrId();
   }


}
